<?php

if (!defined('BASEPATH'))
    exit('No direct script access allowed');

if (!function_exists('managerDiagnosisFieldSearch')) {

    function managerDiagnosisFieldSearch($searchData = array())
    {
        $CI = & get_instance();
        $loading = $CI->lang->line('Loading');
        $_field_search_attribute = array(
            'textsearch' => array('name' => 'textsearch', 'id' => 'frm-textsearch',
                'class' => 'span3', 'placeholder' => $CI->lang->line('Pls_enter_keyword'),
                'value' => set_value('textsearch', isset($searchData['textsearch']) ? $searchData['textsearch'] : '')
            ),
            'submit' => array('name' => 'btn-Search', 'class' => 'btn btn-primary', 'data-loading-text' => $loading,
                'id' => 'form-btnSearch', 'value' => $CI->lang->line('Search')),
            'reset' => array('name' => 'btn-Reset', 'class' => 'btn btn-primary', 'data-loading-text' => $loading,
                'id' => 'form-btnReset', 'value' => $CI->lang->line('Reset')),
        );

        return $_field_search_attribute;
    }

}

if (!function_exists('managerDiagnosisFieldFilter')) {

    function managerDiagnosisFieldFilter($filterData = array(), $filterSelected = 0)
    {
        $CI = & get_instance();
        $loading = $CI->lang->line('Loading');
        $_field_filter_attribute = array(
            'dropdown_filter' => array(
                'name' => 'ia_id',
                'data' => $filterData,
                'selected' => $filterSelected,
                'extra' => "id='frm-ia-attribute-filter' class='span3'"
            ),
            'submit' => array('name' => 'btn-Filter', 'class' => 'btn btn-primary', 'data-loading-text' => $loading,
                'id' => 'form-btnSearch', 'value' => $CI->lang->line('Filter')),
            'reset' => array('name' => 'btn-Reset', 'class' => 'btn btn-primary', 'data-loading-text' => $loading,
                'id' => 'form-btnReset', 'value' => $CI->lang->line('Reset')),
        );

        return $_field_filter_attribute;
    }

}

if (!function_exists('managerDiagnosisForm')) {

    function managerDiagnosisForm($filterData = array(), $filterSelected = 0)
    {
        $CI = & get_instance();
        $loading = $CI->lang->line('Loading');
        $_field_filter_attribute = array(
            'dropdown_score' => array(
                'name' => 'ia_id',
                'data' => $filterData,
                'selected' => $filterSelected,
                'extra' => "id='frm-ia-attribute-filter' class='span3'"
            ),
            'submit' => array('name' => 'btn-Filter', 'class' => 'btn btn-primary', 'data-loading-text' => $loading,
                'id' => 'form-btnSearch', 'value' => $CI->lang->line('Filter')),
            'reset' => array('name' => 'btn-Reset', 'class' => 'btn btn-primary', 'data-loading-text' => $loading,
                'id' => 'form-btnReset', 'value' => $CI->lang->line('Reset')),
        );

        return $_field_filter_attribute;
    }

}

